<?php
Prado::using('yap.web.ui.CPageCrud');
Prado::using('Application.data.ar.UserRecord');

class Sample1 extends CPageCrud
{
	public function getCriteriaCondition()
	{
		return 'username LIKE :search_keyword';
	}

	public function getFinder()
	{
		return UserRecord::finder();
	}
	
	public function getAliasId()
	{
		return 'user';
	}
	
	public function beforeSave(TActiveRecord $record)
	{
		$record->status=1;
	}
}